You have this document as text-file in DBReportDesigner2/doc/man.DBReport.txt
or DBReportDesigner3/doc/man.DBReport.txt
DBReport2 and DBReport3
Designer:
passing parameters to Designer:./DBReportDesigner2.gambas <Path>/<Reportfile>.xml ./DBReportDesigner3.gambas <Path>/<Reportfile>.xml To see the Layout properties, dbl-click into gray area from the Layout Editor. Or select the first element from the properties list (combobox in Properties window) the Layout (05/2010) In the properties list (combobox in Properties window), if you see "<->" , that means "not visible"
Short-Cuts
everywhere :
------------Preview Ctrl+P Save Ctrl+S on an Section :
--------------Left-Mouse-Button raise a PopUp-Menu delete the Section Delete or Backspace (also in PopUp-Menu) with Ctrl
move Section up Ctrl+Up move Section down Ctrl+Down paste Clipboard to Ctrl+V (also in PopUp-Menu) toggles Lock-State Ctrl+Space (also in PopUp-Menu) toggles Layer-State Ctrl+Home (also in PopUp-Menu) with Shift
resize (flater) Shift+Up resize (higher) Shift+Down on an Item:
-----------Left-Mouse-Button raise a PopUp-Menu delete the Item Delete or Backspace (also in PopUp-Menu) with Ctrl
move Item up Ctrl+Up move Item down Ctrl+Down move Item left Ctrl+Left move Item right Ctrl+Right copy the Item(s) Ctrl+C (also in PopUp-Menu) paste the Item(s) Ctrl+V (also in PopUp-Menu) cut the Item(s) Ctrl+X (also in PopUp-Menu) toggles Lock-State Ctrl+Space (also in PopUp-Menu) toggles Layer-State Ctrl+Home (also in PopUp-Menu) with Shift
resize (flater) Shift+Up resize (higher) Shift+Down resize (closer) Shift+Left resize (wider) Shift+Right
locking ItemsItems can be locked (moving by the mouse) All Items on a Section can be locked by locking the Section on lock state, all moving, including by key Short-Cuts are locked changes in Properties-Grid are token selecting/moving Items with mouse, while
press Ctrl 'multi selecting mode' no movment at all
press Shift 'single selecting mode' no movment at all
press Ctrl + Shift 'vertically fixed mode' no movment left/right
press Ctrl + Alt 'horizontal fixed mode' no movment up/downIteration/Sections
In viewer : Page.Header is evaluated before a recordset retrieve, so only show constants and computes based on constants, but not database fields. Viewer don't show data, when there is no Page.Header section For this case, a workaround: use an empty Page.Header section Page.Break.Before => is a section displayed at bottom, just before a page break Page.Break.After => is a band displayed at top, just after a page break
Viewer:
passing parameters to Viewer:
./DBReportViewer2.gambas ./DBReportViewer3.gambas <Path>/<Reportfile>.xml
Name_of_the_Parameter1=Value_of_the_Parameter1
Name_of_the_Parameter2=Value_of_the_Parameter2
Name_of_the_Parameter<n>=Value_of_the_Parameter
- all in one ligne
- Separater is a Space
- There is no FIX possition for parameters (see below).
or
FViewer (out from a gambas project)
passing parameters you have to fill CallingArgs which is a String[]
The first 2 Strings have fixed meanings:
0. "application name" like Application.Args
1.<Path>/<Reportfile>.xml
from here, the entries are identified by the name (first part).
x. Name_of_the_Parameter=Value_of_the_Parameter
y. Name_of_a_connection & "u"=Login
y. Name_of_a_connection & "p"=password
if all connections have the same user/password you can use
{CONNU}=Login
{CONNP}=passwordhere an excample :
SUB byParam02()
DIM $preview AS Object
DIM sStr AS NEW String[]
sStr.Add("FViewer") ' application name !
sStr.Add("/home/userone/gambas/2/DBReport/Test.xml") ' xml file
sStr.Add("pCD_SC=01") ' parameter pCD_SC
sStr.Add("pNumBl=000430")
sStr.Add("Test01u=userone")
sStr.Add("Test01p=secret")
sStr.Add("ArchiveCopy=~/DBReport2/Archive/testArchivCopy.pdf")
IF NOT IsNull($preview) THEN $preview.close()
$preview = NEW (FViewer) ' creating
TRY $preview.CallingArgs.Clear()
$preview.CallingArgs = sStr ' passing the parameters
$preview.Show()
END
A dbl-Click somewhere in the Viewer shows/hides the Thumbnail display.
Iteration/Sections
Viewer don't show data, when there is no Page.Header
a little bit of magic
printing : Page 'page-Nbr' of 'count pages' 'Page ' & Section_Page & ' of ' & Section_Pages in a computed lable
usefull ?
if Report property 'ArchiveCopy' if filled, a copy of the printout is kept as pdf-file.This Report property 'ArchiveCopy' can be overwritten by an "ArchiveCopy" passed as Argument to DBReportViewer
Example : ArchiveCopy=~/DBReport2/Archive/testArchivCopy.pdf
A new argument for DBReportViewer (called from a gambas project): 'GambasCallBackAfterPrint=<path to the function>.<function>'Example : GambasCallBackAfterPrint=MyCallingForm.IamTheCallbackFunction
After printing DBReportViewer tries to calls the function ((has to be PUBLIC and the class exported)), by passing the PRINTER object
and the 'ArchiveCopy' argument as String[].
A Feature, not really documented till now, but on 02.10.2009 implemented by ChristianYou can use DBField results in 'Compute' labels, in place of 'DBText' labels.
Instead of writing myrs.myfield in a DBText, you have to write myrs_myfield (every dot, has to be replaced by a underscore)
So you can make the output like that : iif(len(myrs_myfield)>30,'big','normal')
new argument for DBReportViewer
a new shell argument "AutoPrinting"
without this argument or set to 0, nothing new happens
Set to <> 0, in the PreView window the [Print] button ist pushed automatically and the Printer.Setup dialog isn't called
Attention : all other dialogs, if any, will raise.
If you want to save report sections or layout parts to a template, you have to copy it first to the Clipboard
Now you can sum nummeric DBFields. Just toggle the sum in properties window to 'True'
Syntax : on 'Compute' labels
for the output on footers and headers Sum( <RecordSource>.<Field>[, Optional page-Nbr]). Ex: Sum( Work.hours)
on the page Sum( Page.<RecordSource>.<Field>[, Optional page-Nbr]) Ex: Sum( Page.Work.hours)
page-Nbr is passed to an Eval, so can write "Section_Page-1" to print a carryover. Ex: Sum(Page.Work.hours,Section_Page-1)
page-Nbr is, if not mentioned the actual page number.
To see the Total, pass as page-Nbr "Total" (without the quotes). Ex: Sum( Work.hours,Total)
############################################################
# Attention # the first argument is case sensitive
############################################################
Sections have a condition now, this condition uses EVAL to check, whether it is True or False,
by default it is set to True.
True = the Section is printed
False = the Section is not printed.
Ex.: <RecordSource>_<Field>=0 show all rows having result=0